package com.zhijian.medical.service;

import com.zhijian.medical.entity.po.ExamPaperPersonResult;
import com.zhijian.medical.entity.vo.request.ExamPaperPersonResultSearchVo;
import com.zhijian.medical.entity.vo.response.ExamPaperPersonResultVo;
import com.zhijian.medical.util.Page;

import java.util.List;

/**
 * 考核-试卷人员结果表 业务处理层
 *
 * @author HCG
 * @version 1.0
 * @date 2022-01-18 18:26:49
 */
public interface ExamPaperPersonResultService {

    /**
     * 主键查询
     *
     * @param id
     * @return
     */
    ExamPaperPersonResult selectById(Long id);

    /**
     * 按照主键删除
     *
     * @param id
     */
    void deleteById(Long id);

    /**
     * 新增
     *
     * @param examPaperPersonResult
     * @return
     */
    Long insert(ExamPaperPersonResult examPaperPersonResult);

    /**
     * 更改
     *
     * @param examPaperPersonResult
     * @return
     */
    boolean update(ExamPaperPersonResult examPaperPersonResult);

    /**
     * 总数
     *
     * @param examPaperPersonResultSearchVo
     * @return
     */
    Integer count(ExamPaperPersonResultSearchVo examPaperPersonResultSearchVo);

    /**
     * 列表
     *
     * @param examPaperPersonResultSearchVo
     * @return
     */
    List<ExamPaperPersonResultVo> selectList(ExamPaperPersonResultSearchVo examPaperPersonResultSearchVo);

    /**
     * 分页查询
     *
     * @param examPaperPersonResultSearchVo
     * @return
     */
    Page<ExamPaperPersonResultVo> selectPage(ExamPaperPersonResultSearchVo examPaperPersonResultSearchVo);

    /**
     * 根据试卷id进行删除
     *
     * @param examPaperId
     * @return
     */
    boolean deleteByExamPaperId(Long examPaperId);

    /**
     * 查询一个人在一个试卷中答对题目的数量
     *
     * @param examPaperPersonId
     * @param userId
     * @return
     */
    Integer selectRightCountByExamPaperIdAndUserId(Long examPaperPersonId, Long userId);

}